package space.jevin.jevinboot.utils.validate;

/**
 * 校验结果类
 *
 * @author zhangjiehang
 * @version V1.0
 * @date 2021/5/11 11:29 上午
 */
public class ValidateResult {

    /**
     * 检验是否通过
     */
    private boolean isValid;

    /**
     * 错误信息
     */
    private String message;

    public ValidateResult(boolean isValid) {
        this.isValid = isValid;
    }

    public ValidateResult(boolean isValid, String message) {
        this.isValid = isValid;
        this.message = message;
    }

    public boolean getIsValid() {
        return !isValid;
    }

    public void setValid(boolean valid) {
        isValid = valid;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
